<%-- 
    Document   : main
    Created on : Nov 2, 2012, 9:29:29 AM
    Author     : arif
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">   
        <script type="text/javascript" src="<%=request.getContextPath()%>/res/general.js"></script>
        <script type="text/javascript" src="<%=request.getContextPath()%>/res/jquery/jquery-1.8.2.min.js"></script>
        <script type="text/javascript" src="<%=request.getContextPath()%>/res/jstree/jquery.jstree.js"></script>
        <script type="text/javascript">
            $(document).ready(function($) {
                $("#treeMenu").jstree({ 
                    "themes" : {
                        "theme" : "apple",
                        "dots" : false,
                        "icons" : false
                    },
                    "json_data" : {
                        "ajax" : {
                            "url" : '<%=request.getContextPath()%>/getMenu.action',
                            "data" : function (n) { 
                                return { id : n.attr ? n.attr("id") : 0 }; 
                            }
                        }},
                    "plugins" : [ "themes", "json_data" ]
                })
            });                        
        </script>
    </head>
    <body>
        <div id="treeMenu"></div>
    </body>
</html>
